package com.tiamo.traders.service.serviceImpl;

import com.tiamo.traders.entity.News;
import com.tiamo.traders.mapper.NewsMapper;
import com.tiamo.traders.service.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class NewsServiceImpl implements NewsService {
    @Autowired
    NewsMapper newsMapper;

    @Override
    public int add(News news) {
        return newsMapper.add(news);
    }

    @Override
    public int update(News news) {
        return newsMapper.update(news);
    }

    @Override
    public int delete(News news) {
        return newsMapper.delete(news);
    }

    @Override
    public List<News> findAll(News news) {
        return newsMapper.findAll(news);
    }

    @Override
    public News findById(News news) {
        return newsMapper.findById(news);
    }

    @Override
    public int getCount(News news) {
        return newsMapper.getCount(news);
    }
}
